package com.xuecheng.content.api.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author:王亚栋
 * @Date:2023/8/3 21:39
 * @Version:1.0
 */
@Controller
@RequestMapping("freemarker")
@Api(value = "Freemarker测试接口",tags = "Freemarker测试接口")
public class FreemarkerController {

    @GetMapping("/test")
    @ApiOperation("Freemarker测试接口")
    public ModelAndView test(){

        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("name","王亚栋");

        modelAndView.setViewName("test");

        return modelAndView;
    }
}
